
    const container = document.getElementById('starContainer');
    // 蓝色星星部分（递增）
    for (let i = 1; i <= 5; i++) {
        let stars = '';
        for (let j = 1; j <= 2 * i - 1; j++) {
            stars += '*';
        }
        const starLine = document.createElement('div');
        starLine.style.color = 'blue';
        starLine.textContent = stars;
        container.appendChild(starLine);
    }
    // 红色星星部分（递减）
    for (let i = 5; i >= 1; i--) {
        let stars = '';
        for (let j = 1; j <= 2 * i - 1; j++) {
            stars += '*';
        }
        const starLine = document.createElement('div');
        starLine.style.color = 'red';
        starLine.textContent = stars;
        container.appendChild(starLine);
    }